<?php
/**
 * Created by PhpStorm.
 * User: wangye
 * Date: 19-2-14
 * Time: 下午7:18
 */
$fp = fsockopen("127.0.0.1",8052,$error,$errstr,1);

if (!$fp){
    echo $errstr;
}else{
    $out = "GET / HTTP/1.1\r\n";
    $out .="HOST:127.0.0.1:8001\r\n\r\n";
    fwrite($fp,$out);
    while (!feof($fp)){
        echo fread($fp,512);
    }
    fclose($fp);
}